<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>买家账户</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>
    <style>
        .recharge{
            margin-top: 0px;
        }
        .recharge .box{
            padding-top: 0;
        }
        .recharge .box ul{
            margin-top: 0px;
        }
        .recharge .box ul{
            border-top: solid 1px #fff;

        }
        .recharge .box{
            margin-top: 20px;
        }
        .recharge .box{
            height: auto;
        }
    </style>
</head>

<body>
    <!--头部-->
<!--    <div class="public-header flex">
        &lt;!&ndash;<span class="public-header-left-search"></span>&ndash;&gt;
        <span class="public-header-left-back"></span>
        &lt;!&ndash;<span class="public-header-center">充值</span>&ndash;&gt;
        <span class="public-header-right">明细</span>
    </div>-->

    <!--正文-->
    <div class="recharge bc-gray">
        <div class="box">
    <!--        <h4></h4>
            <p class="tip">冻结款项:
                <font></font>
            </p>-->
            <ul class="ul-four flex">
                <li>
                    <p class="p1">冻结款</p>
                    <p class="p2"></p>
                </li>
                <li>
                    <p class="p1"><a href="../page/Buyer-order.html?status=1">待付款</a></p>
                    <p class="p2"></p>
                </li>
                <li>
                    <p class="p1"><a href="../page/Buyer-order.html?status=2">待发货</a></p>
                    <p class="p2"></p>
                </li>
                <li>
                    <p class="p1"><a href="../page/Buyer-order.html?status=3">待收货</a></p>
                    <p class="p2"></p>
                </li>
            </ul>
        </div>

        <!--<nav class="flex">-->
            <!--<a href="javascript:;">充值</a>-->
            <!--<a href="javascript:;">提现</a>-->
        <!--</nav>-->
        <ul>
         <!--   <li class="flex">
                <span>支付安全</span>
                <em></em>
            </li>-->
            <a href="../page/coupon.html">
               <li class="flex">
                 <span>优惠券</span>
                 <em></em>
               </li>
            </a>

      <!--          <li class="flex">
                    <span>提现</span>
                    <em></em>
                </li>-->

        </ul>
    </div>


    <script>
        $(function () {
            $.ajax({
                url: base_url+'ZITAOHUI/user/account',
                data: {
                    userId: sessionStorage.getItem("uid"),
                    type: 1
                },
                success: function (data) {
                    console.log(data.extend.result);
                    let all_data = data.extend.result;

                    $('.recharge .box h4').text(all_data.balance)
                    $('.recharge .box .tip font').text(all_data.freezeMoney)
                    if(all_data.freezeMoneyNum == 'null'|| all_data.freezeMoneyNum == null || all_data.freezeMoneyNum == 0){
                        $('.recharge .box ul li:nth-child(1) .p2').text(0);

                    }else{
                        $('.recharge .box ul li:nth-child(1) .p2').text(all_data.freezeMoneyNum)
                    }
                    $('.recharge .box ul li:nth-child(2) .p2').text(all_data.pendingPay)
                    $('.recharge .box ul li:nth-child(3) .p2').text(all_data.pendingSend)
                    $('.recharge .box ul li:nth-child(4) .p2').text(all_data.pendingReceive)
                }
            })
        })
    </script>





</body>

</html>